package com.tianruan.psychological.moduls.sys.user.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tianruan.psychological.moduls.sys.user.entry.db.UserRoleDO;


/**
 * @author liuxin
 * @date 2019/9/7
 */
public interface UserRoleMapper extends BaseMapper<UserRoleDO> {

    default void deleteByUserId(String userId){
        QueryWrapper<UserRoleDO> wrapper = new QueryWrapper<>();
        wrapper.eq("user_id", userId);
        this.delete(wrapper);
    }

}
